package com.service;

import com.model.UserInfo;
import org.springframework.stereotype.Service;

@Service
public class UserInfoServiceImpl implements UserInfoService{



    @Override
    public UserInfo findByUsername(String username) {
        System.out.println("UserInfoServiceImpl.findByUsername()");
//        return userInfoRepository.findByUsername(username);
        UserInfo userInfo=new UserInfo();
        userInfo.setUsername("123");
        userInfo.setPassword("123");
        userInfo.setRole("123");
        UserInfo userInfo1=new UserInfo();
        userInfo1.setUsername("admin");
        userInfo1.setPassword("admin");
        userInfo1.setRole("admin");
        if (username.equals("123")){
            return userInfo;
        }else {
            if (username.equals("admin")){
                return userInfo1;
            }
        }
        return null;

    }

}